/* 全局样式重置 */
:root {
  --sidebar-width: 280px;
  --blur-intensity: 8px;
  --accent-color: #2196F3;
}

/* 侧边栏高斯模糊 */
.mdui-drawer {
  backdrop-filter: blur(var(--blur-intensity)) !important;
  background: rgba(255, 255, 255, 0.85) !important;
  width: var(--sidebar-width) !important;
  box-shadow: 4px 0 6px -1px rgba(0, 0, 0, 0.1);
}

/* 目录树样式 */
#fileTree {
  padding: 8px 0;
}

.folder-item {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.folder-item .folder-icon {
  transition: transform 0.2s ease;
  color: var(--accent-color);
}

.folder-item[data-state="expanded"] .folder-icon {
  transform: rotate(90deg);
  color: #4CAF50;
}

.file-item .mdui-icon {
  color: #757575;
}

/* 主内容区 */
#content-card {
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  margin-top: 24px;
  transition: all 0.3s ease;
}

#content {
  padding: 32px;
  font-size: 16px;
  line-height: 1.8;
}

/* 代码块样式 */
pre code.hljs {
  border-radius: 8px;
  padding: 1.5em !important;
  border: 1px solid #e0e0e0;
  background: #f8f9fa !important;
  font-family: 'Fira Code', monospace;
  font-size: 14px;
}

/* 标题样式 */
#content h1 {
  font-weight: 600;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 0.3em;
  margin: 1.5em 0 1em;
}

#content h2 {
  font-weight: 500;
  color: #2c3e50;
  margin: 1.2em 0;
}

/* 表格样式 */
#content table {
  border-collapse: collapse;
  margin: 1.5em 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#content th {
  background: var(--accent-color);
  color: white;
  font-weight: 500;
}

#content td, #content th {
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
}

/* 响应式布局 */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
    --blur-intensity: 6px;
  }

  #content {
    padding: 24px 16px;
    font-size: 15px;
  }

  #content-card {
    margin: 0 -16px;
    border-radius: 0;
    box-shadow: none;
  }

  pre code.hljs {
    font-size: 13px;
    overflow-x: auto;
  }
}

/* 加载动画 */
.mdui-spinner {
  --size: 32px;
  width: var(--size);
  height: var(--size);
  border-width: 4px;
  margin: 48px auto;
}

/* 错误提示 */
.mdui-snackbar {
  border-radius: 8px !important;
  background: #ff5252 !important;
}

/* 链接样式 */
#content a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
  transition: all 0.2s ease;
}

#content a:hover {
  border-bottom-style: solid;
  opacity: 0.9;
}

/* 列表样式 */
#content ul {
  padding-left: 1.8em;
}

#content li {
  margin: 0.6em 0;
  position: relative;
}

#content li::before {
  content: "•";
  color: var(--accent-color);
  position: absolute;
  left: -1.2em;
}

/* 引用块样式 */
#content blockquote {
  border-left: 4px solid var(--accent-color);
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  background: #f8f9fa;
  border-radius: 0 8px 8px 0;
  color: #666;
}

/* 文件夹状态 */
.folder-item.expanding .folder-icon,
.folder-item.collapsing .folder-icon {
    animation: spin 0.6s linear infinite;
}

.folder-item.expanded {
    background: rgba(0, 0, 0, 0.04);
}

.sublist {
    transition: height 0.3s ease;
    overflow: hidden;
}

.loading {
    padding: 16px;
    text-align: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 代码块复制功能 */
pre {
    position: relative;
    margin: 1.5em 0;
    padding-top: 2.5em !important;
}

.copy-container {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

pre:hover .copy-container {
    opacity: 1;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(4px);
    border-radius: 4px;
    padding: 6px !important;
    min-width: auto !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-btn .mdui-icon {
    font-size: 18px !important;
    color: #666 !important;
}

.copy-success {
    position: absolute;
    top: 40px;
    right: 0;
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: none;
    animation: fadeOut 1.5s forwards;
    animation-delay: 1s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 移动端优化 */
@media (max-width: 768px) {
    .copy-container {
        opacity: 1;
    }
    
    .copy-btn {
        padding: 4px !important;
        background: rgba(255, 255, 255, 0.9) !important;
    }
}